
 
 F u n c t i o n :   s e t S k i p L i n k ( d o m E l e m e n t O r C S S S e l e c t o r ,   o b j e c t C o n f i g ) 
 
 
 
 D e s c r i p t i o n :   M o v e s   f o c u s   t o   t h e   s p e c i f i e d   e l e m e n t   u s i n g   a   s m o o t h   s c r o l l   a n i m a t i o n . 
 
 
 
 R e t u r n s :   d o m E l e m e n t ,   o r   $ A   o b j e c t   i f   c h a i n e d . 
 
 
 
 R e q u i r e s   m o d u l e :   " S m o o t h S c r o l l " 
 
 
 
 N o t e :   W h e n   a   s k i p   l i n k   r e f e r e n c e s   a n o t h e r   f o c u s a b l e   a c t i v e   e l e m e n t   s u c h   a s   a   l i n k ,   t h e   t w o   a c t i v e   e l e m e n t s   a r e   a u t o m a t i c a l l y   b o u n d   t o g e t h e r ,   s o   t h a t   a c t i v a t i n g   t h e   r e f e r e n c e d   l i n k   w i l l   r e t u r n   f o c u s   b a c k   t o   t h e   r e c e n t l y   t r i g g e r e d   s k i p   l i n k .   I n   t h i s   m a n n e r ,   b i d i r e c t i o n a l   f o o t n o t e s   c a n   b e   a u t o m a t i c a l l y   c o n f i g u r e d   u s i n g   t h e   s e t S k i p L i n k ( )   f u n c t i o n .   T h e   s k i p R e t u r n   p r o p e r t y   c a n   b e   u s e d   t o   m a n u a l l y   i g n o r e   t h i s   f u n c t i o n a l i t y .   W h e n   m u l t i p l e   f o o t n o t e s   r e f e r e n c e   t h e   s a m e   t a r g e t   e l e m e n t ,   t h e y   w i l l   a u t o m a t i c a l l y   t r a c k   w h i c h   s k i p   l i n k   w a s   u s e d   t o   m o v e   f o c u s   t o   t h a t   l o c a t i o n ,   a f t e r   w h i c h   f o c u s   w i l l   a l w a y s   r e t u r n   t o   t h e   m o s t   r e c e n t l y   u s e d   s k i p   l i n k   a s s o c i a t e d   w i t h   t h a t   t a r g e t . 
 
 
 
 C o n f i g u r a t i o n 
 
 
 
 { 
 
 
 
     / /   O p t i o n a l l y   s p e c i f y   t h e   t a r g e t   e l e m e n t   t o   m o v e   f o c u s   t o . 
 
     t a r g e t :   ' ' , 
 
 
 
     o v e r r i d e :   { 
 
         / /   O p t i o n a l l y   c h a n g e   t h e   V e l o c i t y   a n i m a t i o n   e f f e c t   p r o p e r t i e s   f o r   s i g h t e d   u s e r s . 
 
         d u r a t i o n :   7 5 0 , 
 
         e a s i n g :   " e a s e - i n " 
 
     } , 
 
 
 
     / /   O p t i o n a l l y   c h a n g e   t h e   c o n t e x t   e l e m e n t   w i t h i n   w h i c h   s k i p   l i n k   t a r g e t s   w i l l   b e   q u e r i e d . 
 
     c o n t e x t :   d o c u m e n t , 
 
 
 
     / /   O p t i o n a l l y   o v e r r i d e   t h e   a n i m a t i o n   c o m p l e t e   h a n d l e r   f u n c t i o n . 
 
     c a l l b a c k :   f u n c t i o n ( s k i p L i n k E l e m e n t ,   t a r g e t E l e m e n t )   { 
 
         / /   D o   s o m e t h i n g   a f t e r   t h e   v i s u a l   s c r o l l   a n i m a t i o n   c o m p l e t e s . 
 
         / /   A f t e r   w h i c h ,   t h e   f o l l o w i n g   s t a t e m e n t   i s   r e q u i r e d   t o   e n s u r e   k e y b o a r d   a c c e s s i b i l i t y . 
 
         $ A . f o c u s ( t a r g e t E l e m e n t ) ; 
 
     } , 
 
 
 
     / /   O p t i o n a l l y   s p e c i f y   t h a t   t h e   s k i p   l i n k   i s   p o s i t i o n e d   o f f s c r e e n   a n d   s h o u l d   o n l y   b e c o m e   v i s i b l e   w h e n   i t   r e c e i v e s   f o c u s . 
 
     i s O f f S c r e e n :   f a l s e , 
 
 
 
     / /   O p t i o n a l l y   s e t   t h e   s t y l e   p r o p e r t i e s   t h a t   w i l l   b e   a p p l i e d   w h e n   t h e   s k i p   l i n k   r e c e i v e s   f o c u s   a n d   b e c o m e s   v i s i b l e . 
 
     / /   O n l y   a p p l i c a b l e   w h e n   i s O f f S c r e e n   i s   s e t   t o   t r u e . 
 
     s t y l e :   { 
 
         p o s i t i o n :   " " , 
 
         c l i p :   " a u t o " , 
 
         c l i p P a t h :   " n o n e " , 
 
         p a d d i n g :   " " , 
 
         h e i g h t :   " " , 
 
         w i d t h :   " " , 
 
         o v e r f l o w :   " " , 
 
         w h i t e S p a c e :   " n o r m a l " 
 
     } , 
 
 
 
     / /   O p t i o n a l l y   p r e v e n t   t h e   t a r g e t   e l e m e n t   f r o m   f r o m   r e t u r n i n g   f o c u s   b a c k   t o   t h e   i n i t i a l   t r i g g e r i n g   e l e m e n t . 
 
     s k i p R e t u r n :   f a l s e 
 
 
 
 } 
 
 
 
 S k i p   L i n k   S y n t a x 
 
 
 
 < a   h r e f = " # i d O f E l e m e n t T o M o v e T o H e r e "   c l a s s = " a r i a - s k i p - l i n k "   > S k i p   t o   c o n t e n t . < / a > 
 
 
 
 E x a m p l e : 
 
 
 
 $ A . i m p o r t ( " S m o o t h S c r o l l " ,   {   d e f e r :   t r u e   } ,   f u n c t i o n ( )   { 
 
 
 
     / /   S e t   a   s k i p   l i n k   u s i n g   a   D O M   e l e m e n t . 
 
     / /   A n   a r r a y   o f   D O M   e l e m e n t s   i s   a l s o   s u p p o r t e d . 
 
     $ A . s e t S k i p L i n k ( d o m E l e m e n t ) ; 
 
 
 
     / /   S e t   a   s k i p   l i n k   u s i n g   a   C S S   s e l e c t o r . 
 
     $ A . s e t S k i p L i n k ( ' a [ h r e f ^ = " # " ] . a r i a - s k i p - l i n k ' ) ; 
 
 
 
     / /   S e t   a   s k i p   l i n k   a n d   c h a n g e   c o n f i g u r a t i o n   o p t i o n s . 
 
     $ A . s e t S k i p L i n k ( d o m E l e m e n t ,   { 
 
         i s O f f S c r e e n :   t r u e , 
 
         o v e r r i d e :   { 
 
             d u r a t i o n :   7 5 0 , 
 
             e a s i n g :   " e a s e - i n " 
 
         } 
 
     } ) ; 
 
 
 
 } ) ; 
 
 